#pragma once
#include <vector>
class Sprite;
class CollisionHandler
{
public:
	static CollisionHandler* Instance() {
		if (!m_pInstance) {
			m_pInstance = new CollisionHandler();
		}
		return m_pInstance;
	}
	void attachObserver(Sprite* o);
	void detachObserver(Sprite* o);
	bool checkCollision(Sprite* o);
	void detachAll();

private:
	CollisionHandler(){}
	~CollisionHandler() {}
	static CollisionHandler* m_pInstance;
	std::vector<Sprite*> m_observers;
};

